; Minimum assembler file with one constant data

;;;;;;;
;  Compile with the following command line
;     nasm -f elf min.4.asm


;;;;;;;
;  Link with the following command line
;     ld -s -o min.4 min.4.o



section .rodata		; read only data section
	msg:	db "Hello World", 10	; the string to print, 10=cr

section .text

	global _start   ; must be declared for the linker's entry point (ld)

_start:
	mov	ecx,msg		; arg2, pointer to string
	mov	edx,12		; arg3, length of string to print
	mov	ebx,1			; arg1, where to write, screen
	mov	eax,4			; write sysout command to int 80 hex
	int	0x80			; interrupt 80 hex, call kernel

	mov	eax, 1	; system call number (sys_exit)
	int	0x80
